#include<stdio.h>

int fact(int x)
{
	int a=1,y;
	
	for (y = 1; y <= x; y++)
	{
		a = a * y;

	}
	return a;
}
int main()
{
	int n;
	scanf_s("%d", &n);
	printf("%d", fact(n));
	return 0;
}